package JXY02.Day02;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * 输入某人生日，格式为"yyyy-MM-dd"，输出到现在为止经过了多少周。
 *
 */
public class Text07 {
    public static void main(String[] args) throws ParseException {
        String birth = "2003-11-26";
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        Date date = format.parse(birth);
        String str = format.format(date);
        System.out.println(str);
        System.out.println(date);

        Calendar calendar = Calendar.getInstance();

        System.out.println((calendar.getTimeInMillis()-date.getTime()) / 7 / 24 / 60 / 60 / 1000);

    }
}
